package cate.game.play.buff.h;

import cate.game.play.buff.BuffHandler;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.fighter.Fighter;
import cate.game.play.proce.action.ctx.ActionCtx;

/**
 * 携带[针锋相对的武将死亡后击杀者可获得16%攻击力,发起者收益减半
 */
public class 针锋相对BH extends BuffHandler {

	private int 击杀buff;

	private int 发起者buff;

	//击杀buff=？？&发起者buff=？？
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		击杀buff = args.getInt("击杀buff", 0);
		发起者buff = args.getInt("发起者buff", 0);
	}

	@Override
	public void onDead(ActionCtx action, Fighter killer) {
		killer.buff.tryAddByTid(action, buff.caster, 击杀buff);
		buff.caster.buff.tryAddByTid(action, buff.caster, 发起者buff);
	}
}
